﻿using Application.AppService.IConfig;
using AutoMapper;
using Domain;
using Domain.Entity.Config;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.MoKuaiYi_第一个模块_.Employment_management_录用管理_
{
    public class ERApprovalController : Controller
    {
        private readonly IMapper mapper;
        private readonly IEngage_resumeAppService eRAppService;
        private readonly IEngage_interviewAppService eIAppService;

        public ERApprovalController(IMapper mapper, IEngage_resumeAppService eRAppService, IEngage_interviewAppService eIAppService)
        {
            this.mapper = mapper;
            this.eRAppService = eRAppService;
            this.eIAppService = eIAppService;
        }
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult Index1()
        {
            return View();
        }
        [HttpPost("FYERApproval")]
        public IActionResult FYERApproval(int page, int pageSize)
        {

            ERFenYE erFenYE = eRAppService.DateERSAsync(page, pageSize, 4);
            return Json(erFenYE);
        }
        [HttpPost("UpdateERApproval")]
        public async Task<IActionResult> UpdateERApproval(Engage_resume er)
        {
            bool rs = await eRAppService.UpdateERApprovalAsync(er);
            return Json(rs);
        }
    }
}
